﻿@model B4Deal.Models.Deal
<link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/Layout/giatot_all.css")"/>
<div id="dListDeal">
    <div class="small-box-white">
        <h1>
            <a href="@Url.Action("DetailDeal","Home",new {id= @Model.MaKM})" name="@Model.TenKM" title="@Model.TenKM">@Model.TenKM</a></h1>
        <div class="small-box-img">
            <a href="@Url.Action("DetailDeal","Home",new {id= @Model.MaKM})" name="@Model.TenKM">
                <img src="@Model.HinhAnh" width="268" height="166" alt="@Model.TenKM" title="@Model.TenKM"/>
            </a><i></i>
        </div>
        <div class="small-box-text">
            <p>
                @{var str = Model.MoTa;
                  if (str.Length > 100)
                  {
                      str = str.Substring(0, 100) + " ...";
                  } 
                }
                @str
            </p>
        </div>
        <div class="small-box-button">
            <a href="@Url.Action("DetailDeal","Home",new {id= @Model.MaKM})" name="@Model.TenKM" title="@Model.TenKM" class="view-button">
            </a>
        </div>
        <div class="small-box-sale">
            <p>@{var a = Model.DonGiaMoi / 1000;}@a<span style="font-size: 20px">k</span></p>
            <div class="small-box-save">
                <span class="number">
                    @{var t = (Model.DonGiaCu - Model.DonGiaMoi) * 100 / Model.DonGiaCu;}@t %</span>
                <span>tiết kiệm</span>
            </div>
            <div class="small-box-price">
                <span class="number" id="Time_CountDown_5340">
                    @{t = Model.KetThucKM.DayOfYear - DateTime.Now.DayOfYear;}@t ngày</span> <span>Thời gian còn lại</span>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
</div>
